
from tank import app, db
from tank.core.discover import depends
from flask import Blueprint
from flask_user import SQLAlchemyAdapter, UserManager

depends('tank.contribs.upload', 'tank.contribs.admin')

from . import settings

app.config.from_object(settings)

bp = Blueprint('user', __name__, static_folder='static', template_folder='templates', url_prefix='/user')


from .forms import RegisterForm
from .models import User, UserInvitation

from . import views

db_adapter = SQLAlchemyAdapter(db, User, UserInvitationClass=UserInvitation)
user_manager = UserManager(db_adapter, app,

                           register_form=RegisterForm,
                           user_profile_view_function=views.profile_page)
app.register_blueprint(bp)

from tank.contribs.user import bootstrap

bootstrap.init()
